import { createApp } from 'vue'
import App from './App.vue'
// pinia
import { createPinia } from 'pinia'
import piniaPluginPersist from 'pinia-plugin-persist'
import router from './router'
// ant-design
import Antd from 'ant-design-vue'
import 'ant-design-vue/dist/antd.css'

// 引入 lib-flexible
import 'lib-flexible'
// 蚂蚁全局样式覆盖
import '@/assets/less/global.less'
// 引入全局组件
import GlobalComponent from './components'
// 引入自定义指令
import { permission } from './directives'
// 滚动
import vue3SeamlessScroll from 'vue3-seamless-scroll'
const app = createApp(App)
  .use(createPinia().use(piniaPluginPersist))
  .use(Antd)
  .use(router)
  .use(vue3SeamlessScroll)
  .use(GlobalComponent)
  // 权限认证指令
  .directive('auth', permission)

// 去除一般警告
app.config.warnHandler = function (msg, vm, trace) {}

app.mount('#app')
